11516 - WiFi (Binary search + greedy)
[andmenj-acm.git] / 11455 - Behold my quadrangle / 11455.cpp
blobb778e63b82c1ed72a34d3369805cc1b8f1fc3e7d
1 #include <iostream>
3 using namespace std;
5 int a[4];
7 int main(){
8 int n;
9 cin >> n;
10 while (n--){
11 cin >> a[0] >> a[1] >> a[2] >> a[3];
12 sort(a, a+4);
14 if (a[0] == a[1] && a[1] == a[2] && a[2] == a[3] && a[3] == a[0]){
15 cout << "square" << endl;
16 continue;
19 if (a[0] == a[1] && a[2] == a[3]){
20 cout << "rectangle" << endl;
21 continue;
24 if (a[0]+a[1]+a[2] >= a[3]){
25 cout << "quadrangle" << endl;
26 continue;
28 cout << "banana" << endl;
30 return 0;